import 'dart:convert';

import 'package:mziot/generated/json/base/json_field.dart';
import 'package:mziot/generated/json/product_group_entity.g.dart';

@JsonSerializable()
class ProductGroupEntity {
  String? productGroupName;
  String? productGroupImg;
  double? productGroupId;
  List<ProductGroupProductVos>? productVos;

  ProductGroupEntity();

  factory ProductGroupEntity.fromJson(Map<String, dynamic> json) =>
      $ProductGroupEntityFromJson(json);

  Map<String, dynamic> toJson() => $ProductGroupEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class ProductGroupProductVos {
  double? productId;
  double? productGroupId;
  String? productName;
  String? productImg;
  String? productCode;

  ProductGroupProductVos();

  factory ProductGroupProductVos.fromJson(Map<String, dynamic> json) =>
      $ProductGroupProductVosFromJson(json);

  Map<String, dynamic> toJson() => $ProductGroupProductVosToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
